<?php
/**
*	@author SignpostMarv Martin
*	@package LLSD
*/

/**
*	The class used to represent URIs- allows a native PHP data type to hold URI elements without needing to rely on regex to identify if a string is a URI or not.
*	@package LLSD
*/
class uhu_LLSD_uri extends uhu_LLSD_common
{
/**
*	@var string The URI this instance is to hold
*/
	protected $uri;

/**
*	Builds an instance of uhu_LLSD_uri. Should probably use regex with a configurable paranoid validation mode.
*	@param string|SimpleXMLElement The URI string or node
*	@uses uhu_LLSD_uri::$uri
*/
	public function __construct($uri)
	{
		if($uri instanceof SimpleXMLElement)
		{
			$uri = (string)$uri;
		}
		$this->uri = (string)$uri;
	}
/**
*	Returns the URI
*	@return string The URI supplied via uhu_LLSD_uri::__construct()
*/
	public function __toString()
	{
		return $this->uri;
	}
}
?>